Skip to content

Conversation

@joshfrench
Copy link
Contributor

@joshfrench joshfrench commented Nov 24, 2025

What type of PR is this?
/kind bug

What this PR does / why we need it:
When EKSConfigTemplate.spec.template.spec.files is empty, the resulting cloud config is invalid:

#cloud-config
write_files:
runcmd:
  - /etc/eks/bootstrap.sh cluster-name
cloud-init status --long
status: error
extended_status: error - done
boot_status_code: enabled-by-generator
last_update: Thu, 01 Jan 1970 00:25:50 +0000
detail: Failed due to systemd unit failure
errors:
        - ('write_files', TypeError("'NoneType' object is not iterable"))

Special notes for your reviewer:

This may only be an issue on newer versions of cloud-init (or maybe the underlying system Python?) We've been using CAPA for years and only saw this problem after updating our AMIs to Ubuntu 24.04:

cloud-init --version
/usr/bin/cloud-init 25.2-0ubuntu1~24.04.1

Checklist:

  • squashed commits
  • includes documentation
  • includes emoji in title
  • adds unit tests
  • adds or updates e2e tests

Release note:

Fix invalid cloud-config when EKS config has no files

skip this field entirely if no files are given
@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Nov 24, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign nrb for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 24, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @joshfrench. Thanks for your PR.

I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 24, 2025
@joshfrench joshfrench changed the title write_files: nil is invalid cloud-config 🐛 write_files: nil is invalid cloud-config Nov 24, 2025
@AndiDog
Copy link
Contributor

AndiDog commented Nov 25, 2025

/ok-to-test

Can you please retitle? The PR title sounds like an issue, but it should start with a verb, just like the proposed release note. At best, use present tense: "🐛 Fix ..."

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 25, 2025
@joshfrench joshfrench changed the title 🐛 write_files: nil is invalid cloud-config 🐛 Fix invalid cloud-config when write_files is nil Nov 25, 2025
@joshfrench
Copy link
Contributor Author

/retest

@AndiDog
Copy link
Contributor

AndiDog commented Nov 26, 2025

/test pull-cluster-api-provider-aws-e2e-eks
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 26, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 1725ec4132e6eaf4cec20f9600395bce70756776

@joshfrench
Copy link
Contributor Author

/test pull-cluster-api-provider-aws-e2e-eks

1 similar comment
@joshfrench
Copy link
Contributor Author

/test pull-cluster-api-provider-aws-e2e-eks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants